package com.neu.cpsp.dao;

import com.neu.cpsp.pojo.EvaluateRecord;
import com.neu.cpsp.pojo.EvaluateRecordCurrentQuarter;
import com.neu.cpsp.pojo.EvaluateRecordEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface EvaluateRecordMapper {
    /**
     * 获取处罚记录
     * @return
     */
    List<EvaluateRecord> selectEvaluateRecords(Integer year, Integer quarter);

    List<EvaluateRecord> selectEvaluateRecordsByDepart(List<String> idCardList);

    EvaluateRecord selectRecordById(Integer evaluateRecordId);

    /**
     * 获取当前最大的处罚记录 id
     * @return
     */
    Integer selectCurrMaxEvaluateRecordKey();

    /**
     * 插入数据
     *
     */
    int insertEvaluateRecord(EvaluateRecordEntity record);

    List<EvaluateRecordCurrentQuarter> getSumProp(Integer year, Integer quarter);

    int deleteInfoById(Integer evaluateRecordId);

    int updateByIdSelective(EvaluateRecordEntity evaluateRecordEntity);

    EvaluateRecordEntity checkTimes(@Param("year") Integer year, @Param("quarter") Integer quarter, @Param("employeeIdCard") String employeeIdCard,
                                   @Param("employeeDepart") String employeeDepart,@Param("regulationTypeId") Integer regulationTypeId, @Param("regulationDetailId") Integer regulationDetailId);
}
